package com.logic.landseaserver.persistence.read;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.logic.common.util.QueryUtil;
import com.logic.landseaserver.domain.Bill;
import com.logic.landseaserver.models.refunddiary.bean.RefundDetailResp;
import com.logic.landseaserver.ws.dto.*;
import com.logic.landseaserver.ws.request.CurrentBillReq;
import com.logic.landseaserver.ws.request.RoomStatusStatisticReq;
import com.logic.landseaserver.ws.response.IncomeStatisticResp;

public interface BillReadMapper {

    BillDTO selectByPrimaryKey(Integer id);

    List<BillDTO> selectAllByCurrent(HashMap map);

    List<Bill> queryBillForContract(Integer contractId);

    Bill queryFirstBill(Integer contractId);

    Bill queryLastBill(Integer contractId);

    List<CurrentBillDTO> getCurrentBill(CurrentBillReq req);

    List<CurrentBillDTO> queryBillList(CurrentBillReq req);

    List<UserBillDTO> queryUserBillList(CurrentBillReq req);

    Integer getMaxBillCode(Integer contractId);

    List<Bill> queryBillForCIdStatus(Integer contractId,String status);

    Double sumIncome(RoomStatusStatisticReq req);

    List<IncomeStatisticResp> sumIncomeGroupByType(RoomStatusStatisticReq req);

    Bill selectKey(Integer id);

    Bill selectByContractIdAndBillMonth(Integer contractId1, String billMonth);
    
    List<BillRecordDTO> getMostBillInfo(QueryUtil queryUtil);

    List<DelayOffBillDTO> queryDelayOffBills(HashMap map);

    List<Bill> selectByContractId(Map<String, Object> pmap);

    List<BillDTO> selectBillBySendMsg(HashMap map);

    Bill selectNewlyPayBill(Integer contractId);

    List<RefundDetailResp> getRefundDetail(Integer billId);

    List<RefundDetailResp> getUsedCouponRefundDetail(Integer billId);

    /**
     * 
     * [简要描述]：根据合同查询退房账单</br>
     * [详细描述]：退房账单只可能有一条</br>
     * [作者]：Aaron(2017-12-18)</br>
     *
     * @param contractId
     * @return
     *
     */
    Bill queryOffrentBillByContract(Integer contractId);
    
    /**
     * 
     * [简要描述]：查询合同所有未支付完毕的账单</br>
     * [详细描述]：</br>
     * [作者]：Aaron(2017-12-20)</br>
     *
     * @param contractId
     * @return
     *
     */
    List<Bill> queryNoSuccBillForContract(Integer contractId);
}